<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aitensor Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structaitensor.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">aitensor Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A tensor in AIfES.  
 <a href="structaitensor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="aifes__math_8h_source.html">aifes_math.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:abf7a461af7296a09d5246ca13591b988"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structaimath__dtype.html">aimath_dtype_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaitensor.html#abf7a461af7296a09d5246ca13591b988">dtype</a></td></tr>
<tr class="memdesc:abf7a461af7296a09d5246ca13591b988"><td class="mdescLeft">&#160;</td><td class="mdescRight">The datatype of the tensor, e.g.  <a href="structaitensor.html#abf7a461af7296a09d5246ca13591b988">More...</a><br /></td></tr>
<tr class="separator:abf7a461af7296a09d5246ca13591b988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd6b0c9d182822b4646f744da608eb78"><td class="memItemLeft" align="right" valign="top"><a id="acd6b0c9d182822b4646f744da608eb78"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaitensor.html#acd6b0c9d182822b4646f744da608eb78">dim</a></td></tr>
<tr class="memdesc:acd6b0c9d182822b4646f744da608eb78"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of dimensions. <br /></td></tr>
<tr class="separator:acd6b0c9d182822b4646f744da608eb78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6232867935ce2511be6f94dd8bab6b"><td class="memItemLeft" align="right" valign="top"><a id="a2c6232867935ce2511be6f94dd8bab6b"></a>
uint16_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaitensor.html#a2c6232867935ce2511be6f94dd8bab6b">shape</a></td></tr>
<tr class="memdesc:a2c6232867935ce2511be6f94dd8bab6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">An array of dim elements with the shape of the tensor for example [2, 3]. <br /></td></tr>
<tr class="separator:a2c6232867935ce2511be6f94dd8bab6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab615dd1ddcc27064097dd98cbc7fe9a0"><td class="memItemLeft" align="right" valign="top"><a id="ab615dd1ddcc27064097dd98cbc7fe9a0"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaitensor.html#ab615dd1ddcc27064097dd98cbc7fe9a0">tensor_params</a></td></tr>
<tr class="memdesc:ab615dd1ddcc27064097dd98cbc7fe9a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters to describe some data properties (for example quantization parameters like zero_point and shift) defined by the dtype. <br /></td></tr>
<tr class="separator:ab615dd1ddcc27064097dd98cbc7fe9a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a735984d41155bc1032e09bece8f8d66d"><td class="memItemLeft" align="right" valign="top"><a id="a735984d41155bc1032e09bece8f8d66d"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaitensor.html#a735984d41155bc1032e09bece8f8d66d">data</a></td></tr>
<tr class="memdesc:a735984d41155bc1032e09bece8f8d66d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the actual tensor data. <br /></td></tr>
<tr class="separator:a735984d41155bc1032e09bece8f8d66d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A tensor in AIfES. </p>
<p>This is the main structure to do the calculations with. It represets a tensor (a N-dimensional array) of data values of the given type.</p>
<p>For example the matrix </p><p class="formulaDsp">
\[ \left( \begin{array}{rrr} 0 &amp; 1 &amp; 2 \\ 3 &amp; 4 &amp; 5 \end{array}\right) \]
</p>
<p> can be created with </p><div class="fragment"><div class="line"><span class="keywordtype">float</span> example_data[] = {0.0f, 1.0f, 2.0f,</div>
<div class="line">                        3.0f, 4.0f, 5.0f};</div>
<div class="line">uint16_t example_shape[] = {2, 3};</div>
<div class="line"><a class="code" href="structaitensor.html">aitensor_t</a> example_tensor = {</div>
<div class="line">    .<a class="code" href="structaitensor.html#abf7a461af7296a09d5246ca13591b988">dtype</a> = <a class="code" href="aimath__f32_8h.html#a06eea7384624233f57daab2648d8ce37">aif32</a>,</div>
<div class="line">    .dim = 2,</div>
<div class="line">    .shape = example_shape,</div>
<div class="line">    .data = example_data</div>
<div class="line">};</div>
<div class="ttc" id="aaimath__f32_8h_html_a06eea7384624233f57daab2648d8ce37"><div class="ttname"><a href="aimath__f32_8h.html#a06eea7384624233f57daab2648d8ce37">aif32</a></div><div class="ttdeci">const aimath_dtype_t * aif32</div><div class="ttdoc">The F32 data-type indicator.</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
<div class="ttc" id="astructaitensor_html_abf7a461af7296a09d5246ca13591b988"><div class="ttname"><a href="structaitensor.html#abf7a461af7296a09d5246ca13591b988">aitensor::dtype</a></div><div class="ttdeci">const aimath_dtype_t * dtype</div><div class="ttdoc">The datatype of the tensor, e.g.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:90</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">Field Documentation</h2>
<a id="abf7a461af7296a09d5246ca13591b988"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf7a461af7296a09d5246ca13591b988">&#9670;&nbsp;</a></span>dtype</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structaimath__dtype.html">aimath_dtype_t</a>* dtype</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The datatype of the tensor, e.g. </p>
<p>aif32, aiq7, aiq31, aiu8 </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="aifes__math_8h_source.html">aifes_math.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structaitensor.html">aitensor</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
